package com.transaction.service;

import javax.annotation.Resource;
import javax.jws.WebService;

import org.springframework.stereotype.Component;

@WebService(endpointInterface = "com.transaction.service.IMaterial")
@Component("materialService")
public class MaterialImpl implements IMaterial {
	@Resource
	private MaterialDao materialDao;
	
	public void setMaterialDao(MaterialDao materialDao) {
		this.materialDao = materialDao;
	}

	@Override
	public void collect(String transactionId) {
		/*Transaction transaction = TransactionFactory.init().get(transactionId);
		System.out.println("collect material");*/
		MaterialDto materialDto = new MaterialDto();
		materialDto.setName("material");
		materialDao.add(materialDto);
	}

}
